<?php
/*
* Kusht Mud.
* ----
* The MIT License
* Copyright (c) 2010 Andrew Tutt
* ----
*/

/* PHP Utilities
*
* PHP Lacks some important functions. They are added here.
*/

// Delete an element from an array
function array_del_elem(&$sarray,$element) {
	$sarray = (array) $sarray; // We need an explicit typecast
	$index = array_search($element,$sarray);
	if($index>=0){ array_splice($sarray,$index,1); }
}